package com.system.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class Contract {
    private Integer id;

    private Integer clientId;
    
    private Client client;

    private Integer salerId;
    
    private SysUser sysUser;

    private String contractNum;

    private Double money;

    @DateTimeFormat(pattern = "yyyy/MM/dd")
    @JsonFormat(pattern = "yyyy/MM/dd",timezone = "GMT+8")
    private Date signTime;

    private Boolean status;

    private List<Product> products;

    private Boolean finish;

    private List<Invoice> invoices;

    private List<ContractGoods> contractGoods;

    public void addMoney(double count){
        this.money += count;
    }

}